package com.va.yahooweather.commons;

import java.util.HashMap;
import java.util.Map;

public class ConditionUtil {
    private final Map<Integer, String> conditions = new HashMap<Integer, String>();
    
    public static final ConditionUtil INSTANCE = new ConditionUtil();
    
    private ConditionUtil() {
        conditions.put(0,    "tornado");
        conditions.put(1,    "tropical storm");
        conditions.put(2,    "hurricane");
        conditions.put(3,    "severe thunderstorms");
        conditions.put(4,    "thunderstorms");
        conditions.put(5,    "mixed rain and snow");
        conditions.put(6,    "mixed rain and sleet");
        conditions.put(7,    "mixed snow and sleet");
        conditions.put(8,    "freezing drizzle");
        conditions.put(9,    "drizzle");
        conditions.put(10,   "freezing rain");
        conditions.put(11,   "showers");
        conditions.put(12,   "showers");
        conditions.put(13,   "snow flurries");
        conditions.put(14,   "light snow showers");
        conditions.put(15,   "blowing snow");
        conditions.put(16,   "snow");
        conditions.put(17,   "hail");
        conditions.put(18,   "sleet");
        conditions.put(19,   "dust");
        conditions.put(20,   "foggy");
        conditions.put(21,   "haze");
        conditions.put(22,   "smoky");
        conditions.put(23,   "blustery");
        conditions.put(24,   "windy");
        conditions.put(25,   "cold");
        conditions.put(26,   "cloudy");
        conditions.put(27,   "mostly cloudy (night)");
        conditions.put(28,   "mostly cloudy (day)");
        conditions.put(29,   "partly cloudy (night)");
        conditions.put(30,   "partly cloudy (day)");
        conditions.put(31,   "clear (night)");
        conditions.put(32,   "sunny");
        conditions.put(33,   "fair (night)");
        conditions.put(34,   "fair (day)");
        conditions.put(35,   "mixed rain and hail");
        conditions.put(36,   "hot");
        conditions.put(37,   "isolated thunderstorms");
        conditions.put(38,   "scattered thunderstorms");
        conditions.put(39,   "scattered thunderstorms");
        conditions.put(40,   "scattered showers");
        conditions.put(41,   "heavy snow");
        conditions.put(42,   "scattered snow showers");
        conditions.put(43,   "heavy snow");
        conditions.put(44,   "partly cloudy");
        conditions.put(45,   "thundershowers");
        conditions.put(46,   "snow showers");
        conditions.put(47,   "isolated thundershowers");
        conditions.put(3200, "not available");
    }
    
    public String getDescription(int code) {
        return conditions.get(code);
    }
}
